﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace ResponseMonitor
{
    public partial class NewForm : Form
    {
        public string ProjectName = string.Empty;
        public string ProjectPath = string.Empty;
        public string TestData = string.Empty;

        public NewForm()
        {
            InitializeComponent();
        }

        private void buttonBrowse_Click(object sender, EventArgs e)
        {
            DialogResult result = folderBrowserDialog.ShowDialog();
            if (result == DialogResult.OK)
            {
                string folderName = folderBrowserDialog.SelectedPath;
                textBoxLocation.Text = folderName;
            }
        }

        private void buttonOK_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;

            ProjectName = textBoxProjectName.Text.Trim();
            ProjectPath = textBoxLocation.Text.Trim();
            TestData = textBoxTestData.Text.Trim();

            this.Close();
        }

        private void NewForm_Load(object sender, EventArgs e)
        {
            textBoxProjectName.Text = ProjectName;
            textBoxLocation.Text = ProjectPath;
            textBoxTestData.Text = TestData;
        }

        public void ClearData()
        {
            ProjectName = string.Empty;
            ProjectPath = string.Empty;
            TestData = string.Empty;
        }
    }
}
